package com.outdd.vaietool.module.common.controller;

import com.outdd.vaietool.common.BaseResponse;
import com.outdd.vaietool.common.constants.RedisKeyConstantFun;
import com.outdd.vaietool.common.constants.UrlMapping;
import com.outdd.vaietool.common.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: CommonController
 * @description:
 * @author: VAIE
 * @create: 2021-05-31 15:15
 **/
@RestController
@RequestMapping(UrlMapping.COMMON)
@Slf4j
public class CommonController {

    @PostMapping("/queryDownProgress")
    public BaseResponse queryDownProgress(String uuid) {
        String downProgressARTICLE = RedisKeyConstantFun.getDownProgressARTICLE(uuid);
        Object vaule = RedisUtil.get(downProgressARTICLE);
        return BaseResponse.success(vaule);
    }

    @PostMapping("/queryDownProgress/55")
    public BaseResponse queryDownProgressq(String uuid) {
        String downProgressARTICLE = RedisKeyConstantFun.getDownProgressARTICLE(uuid);
        Object vaule = RedisUtil.get(downProgressARTICLE);
        return BaseResponse.success(vaule);
    }
}
